import request from '@/utils/request'

// 登录
// export function login(data) {
//     return request({
//         url: '/api/login',
//         method: 'post',
//         data
//     })
// }
//获取所有字典值
export function allzd() {
    return request({
        url: "/sysdict/alldict",
        method: "post"
    })
}

// 获取区域类型\提取源(已对接)
export function qylx(type) {
    return request({
        url: "/sysdict/getvalue?typeName=" + type,
        method: "get"
    })
}
//首页：整编成果完成排名(已对接)
export function syzbcgwc(addvcd) {
    return request({
        url: "/index/zbAddvcdRankList?addvcd=" + addvcd,
        method: "get",
        headers: {
            "Content-Type": "application/json"
        }
    })
}

//首页：超采区数据通报成果完成排名(已对接)
export function syccqtvcgwc(addvcd) {
    return request({
        url: "/index/tbAddvcdRankList?addvcd=" + addvcd,
        method: "get",
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 首页：数据提取任务完成情况(后端没接口)


// 首页：数据下发情况统计(已对接)
export function sysjxfqktj(addvcd) {
    return request({
        url: "/index/sendTmList?addvcd=" + addvcd,
        method: "get",
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 行政区划接口(已对接一个)
export function xzqhlist(addvcd) {
    return request({
        url: "/sys/getAddvcdTree?addvcd=" + addvcd,
        method: "get",
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 整编成果校核：未整编站点统计列表(已对接)
export function zbcgwzbzdtj(data) {
    return request({
        url: "/zb/notZbList",
        method: "post",
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 整编成果校核：未整编站点统计列表--导出功能（已对接）
export function zbcgwzbzddc(data) {
    return request({
        url: "/zb/exportNotZbStationList",
        method: "post",
        data: data,
        responseType: 'blob',
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 整编成果校核：未整编站点统计--查看对话框的表格内容(已对接)
export function zbcgwzbzddhklist(etm, stcd, stm) {
    return request({
        url: "/zb/stationMnData?etm=" + etm + '&stcd=' + stcd + '&stm=' + stm,
        method: "get",
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 整编成果校核：未整编站点统计--查看对话框的导出功能（已对接）
export function zbcgwzbzddhkdc(etm, stcd, stm) {
    return request({
        url: "/zb/exportNotZbStationMnData?etm=" + etm + '&stcd=' + stcd + '&stm=' + stm,
        method: "get",
        responseType: 'blob',
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 整编成果校核：数据异常校核统计列表（已对接）
export function zbcgsjyclb(data) {
    return request({
        url: "/zb/abnormalRuleList",
        method: "post",
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 整编成果校核：数据异常校核--查看对话框表格列表（已对接）
export function zbcgsjycckdhklb(data) {
    return request({
        url: "/zb/stationAbnormalData",
        method: "post",
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 整编成果校核：数据异常校核列表---导出（未对接）
export function zbcgjhdc(data) {
    return request({
        url: "/zb/exportAbnormalRuleList",
        method: "post",
        data: data,
        responseType: 'blob',
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 整编成果校核：数据异常校核列表---对话框下载（未对接）
export function zbcgjhdhkdc(data) {
    return request({
        url: "/zb/exportStationRule",
        method: "post",
        data: data,
        responseType: 'blob',
        headers: {
            "Content-Type": "application/json"
        }
    })
}


// 整编成果校核：空值及完成工作量统计列表（已对接）
export function zbcgkzjwcgzllb(data) {
    return request({
        url: "/zb/addvcdNullValueList",
        method: "post",
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 整编成果校核：空值及完成工作量统计导出（已对接）
export function zbcgkzjwcgzldc(data) {
    return request({
        url: "/zb/exportAddvcdNullValue",
        method: "post",
        data: data,
        responseType: 'blob',
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 整编成果校核：空值及完成工作了统计列表空值数量对话框（第二个表格）
export function zbcgkzjwcgzlsllb(data) {
    return request({
        url: "/zb/stNullValueList",
        method: "post",
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 整编成果校核：空值及完成工作量统计空值数量对话框下载(已对接)
//
export function zbcgkzjwcgzldhkdc(data) {
    return request({
        url: "/zb/exportStNullValue",
        method: "post",
        data: data,
        responseType: 'blob',
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 整编成果校核：空值及完成工作量统计列表查看对话框（第二个表格）
// export function zbcgkzjwcgzlckdhklb(data) {
//     return request({
//         url: "/zb/stNullValueList",
//         method: "post",
//         data: data,
//         headers: {
//             "Content-Type": "application/json"
//         }
//     })
// }

// 超采区：未校核站点统计list----同基准值接口
// export function ccqwjhzdtj() {
//     return request({
//         url: '',
//         method: '',
//         headers: {
//             'Content-Type': 'application/json'
//         }
//     })
// }

// 超采区：数据异常校核统计
export function ccqycjhtj(data) {
    return request({
        url: '/tb/abnormal',
        method: 'post',
        data: data,
        headers: {
            'Content-Type': 'application/json'
        }
    })
}
// 
// 超采区：数据异常校核统计----查看对话框第二个表格
export function ccqycjhckdhksed(quarter, stcd, yr) {
    return request({
        url: '/tb/abnormalDlyavg?quarter=' + quarter + '&stcd=' + stcd + '&yr=' + yr,
        method: 'post',
        headers: {
            'Content-Type': 'application/json'
        }
    })
}

// 超采区：数据异常校核统计导出
export function ccqsjycjhlistdc(data) {
    return request({
        url: '/tb/exportOdcdAbnormal',
        method: 'post',
        data: data,
        responseType: 'blob',
        headers: {
            'Content-Type': 'application/json'
        }
    })
}
// 
// 超采区：数据异常校核统计---查看对话框导出
export function ccqsjycjhckdhkdc(data) {
    return request({
        url: '/tb/exportAbnormalDlyavg',
        method: 'post',
        data: data,
        responseType: 'blob',
        headers: {
            'Content-Type': 'application/json'
        }
    })
}

// 超采区：空值及完成工作量统计list
// 
export function ccqkztjlist(data) {
    return request({
        url: '/tb/odcdStat',
        method: 'post',
        data: data,
        headers: {
            'Content-Type': 'application/json'
        }
    })
}

// 超采区：空值及完成工作量统计---空值数量对话框list
export function ccqkztjkzsldhklist(data) {
    return request({
        url: '/tb/odcdNullStationList',
        method: 'post',
        data: data,
        headers: {
            'Content-Type': 'application/json'
        }
    })
}
// 超采区：空值及完成工作量统计----查看对话框list
export function ccqkztjckdhklist(data) {
    return request({
        url: '/tb/stationExamineList',
        method: 'post',
        data: data,
        headers: {
            'Content-Type': 'application/json'
        }
    })
}

// 
// 超采区：空值及完成工作量统计---列表导出功能
export function ccqkztjlistdc(data) {
    return request({
        url: '/tb/exportOdcdStat',
        method: 'post',
        data: data,
        responseType: 'blob',
        headers: {
            'Content-Type': 'application/json'
        }
    })
}
// 
// 超采区：空值及完成工作量统计---空值数量对话框导出
export function ccqkztjsldhkdc(data) {
    return request({
        url: '/tb/exportNullStation',
        method: 'post',
        data: data,
        responseType: 'blob',
        headers: {
            'Content-Type': 'application/json'
        }
    })
}

// 超采区：基准值统计--list
// 
export function ccqjzztjlist(data) {
    return request({
        url: '/tb/search',
        method: 'post',
        data: data,
        headers: {
            'Content-Type': 'application/json'
        }
    })
}
// /tb/exportTb
// 超采区---基准值统计和未校核站点导出功能
export function ccqwjhjzzdc(data) {
    return request({
        url: "/tb/exportTb",
        method: "post",
        responseType: 'blob',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 数据提取：任务列表list
export function sjtqrwlblist(data) {
    return request({
        url: "/task/taskList",
        method: "post",
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 
// 数据提取：任务列表---批量删除
export function sjtqrwlbplsc(data) {
    return request({
        url: "/task/batchDeleteTask",
        method: "DELETE",
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// /station/getStationListByAddvcd
// 数据提取：任务列表----新增对话框，根据行政区划和测站类别，获取测站选取的下拉框
export function sjtqrwlbczxq(areaCode, stationGenre) {
    return request({
        url: "/station/getStationListByAddvcd?areaCode=" + areaCode + '&stationGenre=' + stationGenre,
        method: "get",
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 
// 数据提取：任务列表---新增确定
export function sjtqrwlbxzqd(data) {
    return request({
        url: "/task/saveTask",
        method: "post",
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 
// 数据提取：任务列表---新增对话框，单元名称也改变---测站选取，，，，超采区
export function sjtqccqdymccz(areaCode, stationGenre) {
    return request({
        url: '/station/getStationInfoByOverDrawn?areaCode=' + areaCode + '&stationGenre=' + stationGenre,
        method: 'get',
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 
// 数据提取：任务列表--新增对话框，区域类型改变--单元名称也改变，，，获取平原区信息
export function sjtqpyqdymc(addvcd) {
    return request({
        url: '/sys/getChfcadList?addvcd=' + addvcd,
        method: 'get',
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 数据提取：任务列表--新增对话框，单元名称为平原区和测站类别，获取测站选取的数据

export function sjtqpyqdymcczxq(areaCode, stationGenre) {
    return request({
        url: '/station/getStationListByChfcad?areaCode=' + areaCode + '&stationGenre=' + stationGenre,
        method: 'get',
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 数据提取：任务列表--新增对话框，区域类型改变--单元名称也改变，，获取超采区信息
export function sjtqccqdymc(addvcd) {
    return request({
        url: '/tb/getOdInfo?addvcd=' + addvcd,
        method: 'get',
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 数据提取：任务列表----编辑
export function sjtqrwlbbjxg(data) {
    return request({
        url: "/task/updateTask",
        method: "post",
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// /station/getStationInfoByStcd
// 
// 数据提取：任务列表----测站数量对话框list
export function sjtqrwlbczsldhk(data) {
    return request({
        url: "/station/getTaskStationInfo",
        method: "post",
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 
// 数据提取：任务列表---表格icon删除
export function sjtqrwlbiconsc(addvcd) {
    return request({
        url: "/task/deleteTask/" + addvcd,
        method: "get",
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 
// 数据提取：任务列表----修改状态
export function sjtqrwlbxgzt(data) {
    return request({
        url: "/task/updateStatus",
        method: "put",
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 数据提取：成果展示list
export function sjtqcgzslb(data) {
    return request({
        url: "/taskLog/taskLogList",
        method: "post",
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 
// 数据提取：成果展示批量删除
export function sjtqcgzsplsc(data) {
    return request({
        url: "/taskLog/batchDeleteTaskLog",
        method: "post",
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// /taskLog/download
// 数据提取：成果展示导出
export function sjtqcgzsdc(data) {
    return request({
        url: "/taskLog/exportList",
        method: "post",
        responseType: 'blob',
        data:data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// /taskLog/export
// 数据提取：成果展示---表格小icon下载
export function sjtqcgzslbxiaz(data) {
    return request({
        url: "/taskLog/export",
        method: "post",
        data: data,
        responseType: 'blob',
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 数据提取：成果展示---表格里的icon删除
export function sjtqcgzsiconsc(addvcd) {
    return request({
        url: "/taskLog/deleteTaskLog/" + addvcd,
        method: "get",
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 数据提取：成果展示----测站数量对话框list
// 
export function sjtqcgzscesllb(data) {
    return request({
        url: "/taskLog/show",
        method: "post",
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 数据提取：任务监控

// 系统管理：用户管理

// 系统管理：角色管理

// 系统管理：菜单管理list
// /menumanagement/search
export function xtglcdgllist(data) {
    return request({
        url: "/menumanagement/search",
        method: "post",
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 
// 菜单管理：---新增
export function xtglcdgllistxz(data) {
    return request({
        url: "/menumanagement/add",
        method: "post",
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 菜单管理：---删除
export function xtglcdgllistsc(mid) {
    return request({
        url: "/menumanagement/delete?mid=" + mid,
        method: "get",
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 
// 菜单管理：---父级菜单级联树
export function xtglcdgljl() {
    return request({
        url: "/menumanagement/allmenu",
        method: "get",
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 
// 菜单管理：-----列表编辑功能
export function xtglcdgllbbj(data) {
    return request({
        url: '/menumanagement/update',
        method: 'post',
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 系统管理：测站异常规则设定--列表查询(已对接)
export function czyclbcx(data) {
    return request({
        url: "/sys/stationRuleList",
        method: "post",
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 系统管理：测站异常规则设定--测站阈值查询(已对接，有点问题，返回的是一个对象)
export function czycyzcx(stcd) {
    return request({
        url: "/sys/ruleLogInfo/" + stcd,
        method: "get",
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 系统管理：测站异常规则设定--测站阈值编辑(已对接)
export function czycyzbj(data) {
    return request({
        url: "/sys/updateRule",
        method: "post",
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}

//系统管理：测站异常规则设定--列表导出（已对接）
export function czyclbdc(data) {
    return request({
        url: "/sys/exportRule",
        method: "post",
        data: data,
        responseType: 'blob',
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 系统管理：测站异常规则设定----查看对话框下载(已对接)
export function czyclbdhkdc(data) {
    return request({
        url: "/sys/exportStRule",
        method: "post",
        data: data,
        responseType: 'blob',
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 系统管理：代表站异常规则设定list
// 
export function dbzyclist(data) {
    return request({
        url: "/sys/odStationRuleList",
        method: "post",
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// /
// 系统管理：代表站异常导出
export function dbzyclbdc(data) {
    return request({
        url: "sys/exportOdRule",
        method: "post",
        data: data,
        responseType: 'blob',
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// /sys/odRuleLogInfo/
// 系统管理：代表站查看对话框
export function dbzycckdhk(stcd) {
    return request({
        url: "/sys/odRuleLogInfo/" + stcd,
        method: "get",
        headers: {
            "Content-Type": "application/json"
        }
    })
}
// 
// 系统管理：代表站查看对话框的下载
export function dbzycckdhkdc(data) {
    return request({
        url: "/sys/exportOdStRule",
        method: "post",
        data: data,
        responseType: 'blob',
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 系统管理：代表站异常编辑修改
export function dbzyclbbj(data) {
    return request({
        url: "/sys/updateOdRule",
        method: "post",
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}

// 系统管理：系统日志list
export function xtglxtrzlist(data) {
    return request({
        url: "/syslog/search",
        method: "post",
        data: data,
        headers: {
            "Content-Type": "application/json"
        }
    })
}
